package com.hzlx.service;

import com.hzlx.dao.CuttingMachineStatusDao;
import com.hzlx.entity.CuttingMachineStatus;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class CuttingMachineStatusService {
    @Resource
    private CuttingMachineStatusDao dao;
    public CuttingMachineStatus latest20s(){
        Date from = new Date(System.currentTimeMillis() - 2_000);
        System.out.println(from);
        return dao.findFirstByOrderByCreatedAtDesc();
    }
}
